<form action="keyword.manage.php?action=ajax_list" id="form_search" name="form_search" method="post">
<table class="from_table">
	  <tr>
	  <th><tpl> $langKeywordName </tpl>&nbsp;  ：</th>
		<td width="530" class="td1"><input type="text" id="search_keyword" name="search_keyword" size="10" class="txtinput"/></td></tr>
	  <tr>
	  <th><tpl> $langKeywordDisDegree </tpl> ：</th>
	  	<td width="530" class="td1"><input type="text" id="search_one_num" class="txtinput" name="search_one_num" size="6" /> <tpl> $langKeywordTo </tpl> <input type="text" id="search_two_num" class="txtinput"  name="search_two_num" size="6" /></td></tr>
		<tr>
		<th><tpl> $langKeywordLastlyUpdataTime </tpl>：</th>
		 <td width="530" class="td1"><input type="text" name="start_date" id="s_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px;" readonly="readonly" value="<tpl> $input.start_date </tpl>" /> <tpl> $langKeywordTo </tpl>
			  <input type="text" name="end_date" id="e_date" style="border:solid 1px #B0DF82;cursor:pointer; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px; " readonly="readonly" value="<tpl> $input.end_date </tpl>" />
		</td>
      </tr>
	  <tr>
	  	<td></td>
		  <td width="530"><span class="btn_left">
	    <input type="button" value="<tpl> $langKeywordQuery </tpl>" name="search_submit" id="search_submit" class="btn_submit"/></span></td>
      </tr>
</table>
</form>
<form action="keyword.manage.php" id="form_del" name="form_del" method="post">
	<input type="hidden" name="action" id="action" value="del" />
    <table class="from_table2_one top-1" >
      <thead>
	  <tr class="area_ajax_list_title">
	    <th class="pd-left" width="50"><tpl> $langKeywordSelect </tpl></th>	
        <th width="150"><tpl> $langKeyword </tpl></th>
   	      <th width="150"><tpl> $langKeywordSeachDegree </tpl></th>
	    <th width="200"><tpl> $langKeywordUpdataTime </tpl></th>
		  <th width="100"><tpl> $langCOperation </tpl></th>
      </tr>
	  </thead>
	  <tpl> if $keyword_array[0].keyword_id neq '' </tpl>
		  <tpl> section name=i loop=$keyword_array </tpl>
		  <tr>
		    <td class="pd-left" width="50"><input name="keyword_id[]" type="checkbox" value="<tpl> $keyword_array[i].keyword_id </tpl>"/></td>	
		    <td width="150"><tpl> $keyword_array[i].keyword_name </tpl></td>
			  <td width="150"><tpl> $keyword_array[i].keyword_num </tpl></td>
		    <td width="200"><tpl> $keyword_array[i].update_date </tpl></td>
			  <td width="100">
			  	<a href="javascript:;" onclick="hideMessage();ajax_modi('<tpl> $keyword_array[i].keyword_id </tpl>');" title="<tpl> $langCedit </tpl>" class="edit_a_pic">
			  	</a> 
			</td>
		  </tr>
		  <tpl> /section </tpl>

		  <tpl> else  </tpl>
		  <tr>
			<td colspan="5" align="center"><tpl> $langKeywordNotContent </tpl></td>
		  </tr>
		<tpl> /if </tpl>
  </table>
   <tpl> if $keyword_array[0].keyword_id neq '' </tpl>
  <div class="table-5-bottom">
  <div class="p-left">
  	<span class="btn_left"><input name="selectall" type="button" id="selectall" value="<tpl> $langKeywordAllSelect </tpl>" class="btn_submit"/></span>
				<span class="btn_left"><input name="negative" type="button" id="negative" value="<tpl> $langKeywordContrarySelect </tpl>" class="btn_submit"/></span>
				<span class="btn_left"><input type="button" id="delbutton" name="delbutton" value="<tpl> $langKeywordDelete </tpl>" class="btn_submit"/></span>
		
				<div class="btn_marginright">
				<tpl> $page_list </tpl>		
				</div>
  </div>
  </div>
  <tpl> /if </tpl>
</form>
<div id="question" style="display:none; cursor: default; padding:10px"> 
        <b style=" font-size:14px; margin-top:10px; line-height:50px; height:50px;padding-

top:10px; padding-bottom:10px"><tpl> $langKeywordConfirmDelete </tpl></b> <br />
        <input type="button" id="yes" value="<tpl> $langCYes </tpl>"  style=" border:1px solid 

#CCCCCC;width:80px; margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/> 
        <input type="button" id="no" value="<tpl> $langCNo </tpl>"  style="border:1px solid #CCCCCC;width:80px; 

margin:5px; background-image:url(../templates/system_new/images/anniu.gif)"/>
		<input type="hidden" id="del_value" />
</div> 
<script>
$(document).ready(function() {	
	$('#negative').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',!$(this).attr('checked'))
			})
		}
	);
	$('#selectall').click(
		function(){
			$('#form_del input[@type=checkbox]').each(function(){
				$(this).attr('checked',true)
			})
		}
	);
	
	//删除操作
	var options_del = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						showMessage(msg.message,msg.type);
						if(msg.type == '1'){
							ShowDiv = "result_content";
							getPageContent("keyword.manage.php?action=ajax_list");
						}
					},
		type:      'post',
		dataType:  'json'
	};
	
	var question = $('#question')[0];
	$("#delbutton").click(function(){
		$.blockUI(question, { width: '275px' });
	});
	
	$('#yes').click(function() {
			$.unblockUI();
			$('#form_del').ajaxSubmit(options_del);	
			return false;
		});
	$('#no').click($.unblockUI);
	
	//检索提交表单
	var options_search = {
		beforeSubmit:  function(){showLoading(showText);},
		success:       function(msg){
						hideLoading();
						$("#result_content").html(msg);				
					},
		type:      'post',
		dataType:  'html'
	};
	$("#search_submit").click(function(){
		$('#form_search').ajaxSubmit(options_search);	
	});
});	

$(function(){
   $("#s_date").datepicker();
   $("#e_date").datepicker();
})

//编辑
function ajax_modi(id){
	//载入页面
	ShowDiv = "result_content";
	getPageContent("keyword.manage.php?action=modi&id="+id);
}
</script>